/*
* 路由器模块
* */
// vue-router插件是在vue上运行，需要引入 vue
import Vue from 'vue'
// 需要引入 vue-router插件
import VueRouter from 'vue-router'
// 引入路由组件
import Msite from '../pages/Msite/Msite.vue'
import Search from '../pages/Search/Search.vue'
import Order from '../pages/Order/Order.vue'
import Profile from '../pages/Profile/Profile.vue'
import Login from '../pages/Login/Login.vue'
// 插件需要注册
Vue.use(VueRouter)
// 对外暴露对象
export default new VueRouter({
  // 所有路由
  routes: [
    {
      path: '/msite',
      component: Msite,
      meta: {
        showFooter: true
      }
    },
    {
      path: '/search',
      component: Search,
      meta: {
        showFooter: true
      }
    },
    {
      path: '/order',
      component: Order,
      meta: {
        showFooter: true
      }
    },
    {
      path: '/profile',
      component: Profile,
      meta: {
        showFooter: true
      }
    },
    {
      path: '/login',
      component: Login,
      meta: {
        showFooter: false
      }
    },
    {/* 默认的显示页面*/
      path: '/',
      redirect: '/msite'
    }
  ]

})
